def bubble_sort(array):
    for i in range(len(array) - 1):
        for j in range(len(array) - i - 1):
            if array[j] > array[j + 1]:
                array[j], array[j + 1] = array[j + 1], array[j]
    print(array)


def selection_sort(array):
    for i in range(len(array) - 1):
        min_index = i
        for j in range(i, len(array)):
            if array[j] < array[min_index]:
                min_index = j
        array[i], array[min_index] = array[min_index], array[i]
    print(array)


if __name__ == '__main__':
    array = [9, 2, 6, 3, 5, 12, 85, 57, 34, 85, 4, 99, 34]
    bubble_sort(array)
    selection_sort(array)
